package o;

import androidx.annotation.Nullable;
import com.google.android.exoplayer2.upstream.DataSpec;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;

public abstract class alf implements alj {
    @Nullable
    private DataSpec ˊ;
    private final boolean ˋ;
    private int ˏ;
    private final ArrayList<alx> ॱ = new ArrayList(1);

    protected alf(boolean z) {
        this.ˋ = z;
    }

    public final void ॱ(alx o_alx) {
        if (!this.ॱ.contains(o_alx)) {
            this.ॱ.add(o_alx);
            this.ˏ++;
        }
    }

    protected final void ˊ(DataSpec dataSpec) {
        for (int i = 0; i < this.ˏ; i++) {
            ((alx) this.ॱ.get(i)).ˎ(this, dataSpec, this.ˋ);
        }
    }

    protected final void ˎ(DataSpec dataSpec) {
        this.ˊ = dataSpec;
        for (int i = 0; i < this.ˏ; i++) {
            ((alx) this.ॱ.get(i)).ˋ(this, dataSpec, this.ˋ);
        }
    }

    protected final void ˊ(int i) {
        DataSpec dataSpec = (DataSpec) anr.ˎ(this.ˊ);
        for (int i2 = 0; i2 < this.ˏ; i2++) {
            ((alx) this.ॱ.get(i2)).ˊ(this, dataSpec, this.ˋ, i);
        }
    }

    protected final void ˏ() {
        DataSpec dataSpec = (DataSpec) anr.ˎ(this.ˊ);
        for (int i = 0; i < this.ˏ; i++) {
            ((alx) this.ॱ.get(i)).ॱ(this, dataSpec, this.ˋ);
        }
        this.ˊ = null;
    }

    public Map<String, List<String>> ˎ() {
        return Collections.emptyMap();
    }
}
